class student:
    name = None
    age = None

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def __str__(self):
        return f"{self.name}同学的年龄为{self.age}"

    # 感觉没什么用......
    def __lt__(self, other):
        return self.age < other.age

    # 同上
    def __le__(self, other):
        return self.age <= other.age

    # 有什么用呢？
    def __eq__(self, other):
        return self.age == other.age


Jack = student("Jack", 18)
Nick = student("Nick", 17)
print(Jack)
print(Jack > Nick)
# ???
print(Jack.age > Nick.age)

print(Jack >= Nick)
# ???
print(Jack.age >= Nick.age)

print(Jack == Nick)
# ???
print(Jack.age == Nick.age)
